package my.study.designpattern.decorator.example1;

/**
 * 抽象装饰者
 * 
 */
public abstract class AbstractDecorator implements InterfaceComponent {

	private InterfaceComponent component;

	public AbstractDecorator(InterfaceComponent component) {
		this.component = component;
	}

	/**
	 * 组件方法执行前预处理方法
	 * 
	 */
	protected void preSay() {
	};

	/**
	 * 组件方法执行后处理方法
	 * 
	 */
	protected void afterSay() {
	};

	public void say() {

		preSay();
		component.say();
		afterSay();

	};
}